package com.hoyue.dao;

import com.hoyue.bean.Character;

import java.sql.SQLException;
import java.util.List;

public interface CharacterDao {

    /**
     * 添加人物介绍内容
     * @param character
     * @throws SQLException
     */
    public void addChar(Character character) throws SQLException;

    /**
     * 添加人物介绍内容
     * @param id
     * @throws SQLException
     */
    public void deleteChar(int id) throws SQLException;

    /**
     * 查找人物介绍内容
     * @param id
     * @throws SQLException
     */
    public Character findById(int id) throws SQLException;

    /**
     * 更新人物介绍内容
     * @param character
     * @throws SQLException
     */
    void updateChar(Character character) throws SQLException;

    /**
     * 返回人物信息集合
     * @return
     * @throws SQLException
     */
    List<Character> getAllChar() throws SQLException;

    public Character getCharacterById(String id) throws SQLException;

    /**
     * 根据id返回图片路径
     * @param id
     * @return
     * @throws SQLException
     */
    String getAddressById(int id) throws SQLException;
}


